﻿using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using AutoR.Services;
using Prism.Mvvm;

namespace AutoR.Tasks
{
	// Token: 0x020000EC RID: 236
	public class DelayTask : BindableBase
	{
		// Token: 0x17000164 RID: 356
		// (get) Token: 0x06000504 RID: 1284 RVA: 0x00052C02 File Offset: 0x00050E02
		// (set) Token: 0x06000505 RID: 1285 RVA: 0x00052C0C File Offset: 0x00050E0C
		protected DateTime _lastCheck
		{
			[CompilerGenerated]
			get
			{
				return this.<_lastCheck>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (DateTime.Equals(this.<_lastCheck>k__BackingField, value))
				{
					return;
				}
				this.<_lastCheck>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs._lastCheck);
			}
		}

		// Token: 0x17000165 RID: 357
		// (get) Token: 0x06000506 RID: 1286 RVA: 0x000408F6 File Offset: 0x0003EAF6
		protected GameData Game
		{
			get
			{
				return Runtime.Game;
			}
		}

		// Token: 0x17000166 RID: 358
		// (get) Token: 0x06000507 RID: 1287 RVA: 0x00052C3C File Offset: 0x00050E3C
		// (set) Token: 0x06000508 RID: 1288 RVA: 0x00052C44 File Offset: 0x00050E44
		public string Type
		{
			[CompilerGenerated]
			get
			{
				return this.<Type>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<Type>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<Type>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Type);
			}
		}

		// Token: 0x17000167 RID: 359
		// (get) Token: 0x06000509 RID: 1289 RVA: 0x00052C75 File Offset: 0x00050E75
		// (set) Token: 0x0600050A RID: 1290 RVA: 0x00052C80 File Offset: 0x00050E80
		public Queue<int> QuickBuildQueue
		{
			[CompilerGenerated]
			get
			{
				return this.<QuickBuildQueue>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<QuickBuildQueue>k__BackingField, value))
				{
					return;
				}
				this.<QuickBuildQueue>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.QuickBuildQueue);
			}
		}

		// Token: 0x17000168 RID: 360
		// (get) Token: 0x0600050B RID: 1291 RVA: 0x00052CB0 File Offset: 0x00050EB0
		// (set) Token: 0x0600050C RID: 1292 RVA: 0x00052CB8 File Offset: 0x00050EB8
		public Queue<int> QuickEquipmentQueue
		{
			[CompilerGenerated]
			get
			{
				return this.<QuickEquipmentQueue>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<QuickEquipmentQueue>k__BackingField, value))
				{
					return;
				}
				this.<QuickEquipmentQueue>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.QuickEquipmentQueue);
			}
		}

		// Token: 0x17000169 RID: 361
		// (get) Token: 0x0600050D RID: 1293 RVA: 0x00052CE8 File Offset: 0x00050EE8
		// (set) Token: 0x0600050E RID: 1294 RVA: 0x00052CF0 File Offset: 0x00050EF0
		public Queue<int> QuickRepairQueue
		{
			[CompilerGenerated]
			get
			{
				return this.<QuickRepairQueue>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<QuickRepairQueue>k__BackingField, value))
				{
					return;
				}
				this.<QuickRepairQueue>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.QuickRepairQueue);
			}
		}

		// Token: 0x1700016A RID: 362
		// (get) Token: 0x0600050F RID: 1295 RVA: 0x00052D20 File Offset: 0x00050F20
		// (set) Token: 0x06000510 RID: 1296 RVA: 0x00052D28 File Offset: 0x00050F28
		public Queue<string> ChangeBoatQueue
		{
			[CompilerGenerated]
			get
			{
				return this.<ChangeBoatQueue>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<ChangeBoatQueue>k__BackingField, value))
				{
					return;
				}
				this.<ChangeBoatQueue>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ChangeBoatQueue);
			}
		}

		// Token: 0x1700016B RID: 363
		// (get) Token: 0x06000511 RID: 1297 RVA: 0x00052D58 File Offset: 0x00050F58
		// (set) Token: 0x06000512 RID: 1298 RVA: 0x00052D60 File Offset: 0x00050F60
		public Queue<string> ChangeEquipmentQueue
		{
			[CompilerGenerated]
			get
			{
				return this.<ChangeEquipmentQueue>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (object.Equals(this.<ChangeEquipmentQueue>k__BackingField, value))
				{
					return;
				}
				this.<ChangeEquipmentQueue>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ChangeEquipmentQueue);
			}
		}

		// Token: 0x06000513 RID: 1299 RVA: 0x00052D90 File Offset: 0x00050F90
		public async Task Start()
		{
			if (this.Game.GlobalConfig.MinSeconds < 5)
			{
				this.Game.GlobalConfig.MinSeconds = 5;
			}
			if (this.Game.GlobalConfig.MaxSeconds < 10)
			{
				this.Game.GlobalConfig.MaxSeconds = 10;
			}
			await this.<Start>g__GetRank|31_0();
			await this.<Start>g__QuickRepairQueue|31_1();
			await this.<Start>g__ChangeBoatQueue|31_2();
			await this.<Start>g__ChangeEquipmentQueue|31_3();
			await this.<Start>g__QuickBuildQueue|31_4();
			await this.<Start>g__QuickEquipmentQueue|31_5();
			await this.<Start>g__GetBoat|31_6();
			await this.<Start>g__GetEquipment|31_7();
			await this.<Start>g__BuildBoat|31_8();
			await this.<Start>g__BuildEquipment|31_9();
			await this.<Start>g__AutoSecretary|31_10();
		}

		// Token: 0x06000514 RID: 1300 RVA: 0x00052DD8 File Offset: 0x00050FD8
		public DelayTask()
		{
			this.<Type>k__BackingField = "DelayTask";
			this.<QuickBuildQueue>k__BackingField = new Queue<int>();
			this.<QuickEquipmentQueue>k__BackingField = new Queue<int>();
			this.<QuickRepairQueue>k__BackingField = new Queue<int>();
			this.<ChangeBoatQueue>k__BackingField = new Queue<string>();
			this.<ChangeEquipmentQueue>k__BackingField = new Queue<string>();
			base..ctor();
		}

		// Token: 0x040003E0 RID: 992
		private bool _firstCheck;
	}
}
